import urllib
from urllib import request,parse

#{
# url = "https://movie.douban.com/j/chart/top_list?type=11&interval_id=100%3A90&action=&"
#
# headers={"User-Agent": "Mozilla...."}
#
# # 变动的是这两个参数，从start开始往后显示limit个
# formdata = {
#     'start':'0',
#     'limit':'10'
# };
# data = urllib.parse.urlencode(formdata);
# re = urllib.request.Request(url + data, headers = headers);
# response = urllib.request.urlopen(re);
# buff=response.read();
# html=buff.decode("utf-8");
# print (html);
#}

url = "https://movie.douban.com/j/chart/top_list?"
headers={"User-Agent": "Mozilla...."}

# 处理所有参数
formdata = {
    'type':'11',
    'interval_id':'100:90',
    'action':'',
    'start':'0',
    'limit':'10'
}
data = parse.urlencode(formdata);
re = request.Request(url + data, headers = headers);
response = request.urlopen(re);
buff=response.read();
html=buff.decode("utf-8");
print(html);